-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion mode UI #6523
suggestion mode UI #6523
Conversation
"default": true | ||
"cody.suggestions.mode": { | ||
"type": "string", | ||
"enum": ["autocomplete", "auto-edits (Experimental)", "off"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the recent thread where we decided to hide this from users who do not have access to the feature, do you think we should change this PR to use a quick pick menu or something else that can be dynamically updated based on feature flag values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following up on slack here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @valerybugakov
I will add a pop-up to communicate to the user why they are not eligible as per slack discussion.
It would be much easier for me to do this in #6463 this PR instead of current one, because it would create conflict between the PRs when I rebase. Would that be okay ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, let's do that!
## Context Currently `auto-edits` is not reactive to config changes and hence requires vscode reloading. If the user doesn't reload vscode `auto-edits` suggestion doesn't do away because the `auto-edits` provider is not `disposed` on the config change. This results into: 1. If the user turns off the suggestion mode: they will keep on seeing the `auto-edits` suggestions. 2. If user switches from the `auto-edits` to `autocomplete` mode, they will see the suggestion from both `autocomplete` and `auto-edits`. 3. The PR makes `auto-edits` reactive to the `authStatus` and `config` change similar to `autocomplete`, so that `auto-edits` is reactive and destroyed/created on the config changes without reloading vscode. 4. Build on top of: #6523 Example image below: <img width="607" alt="image" src="https://github.com/user-attachments/assets/c87a06d6-063e-46f1-b87e-8ef9ba59f519" /> ## Test plan 1. Add the breakpoints at `dispose` function and `provideInlineCompletion` function for `autocomplete` and `auto-edits` and make sure they are disposed and created upon config changes without reloading vscode. 2. CI
With
auto-edits
being a replacement ofautocomplete
. Based on the suggestion The, PR adds adrop-down
for the users to choose between the "autocomplete", "auto-edits" and "Off".The PR deprecates the 2 earlier
configurations
:cody.autocomplete.enabled
cody.experimental.autoedits.enabled
And introduces the
cody.suggestions.mode: 'autocomplete' | 'auto-edits' | 'off'
for the users to choose from.Test plan
Green CI
Also tested the agent test cases with the new config. Agent takes the default values from
vscode/package.json
which usesautocomplete
as default for suggestion mode and it works.